﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DistributionRangeList.aspx.cs"
    Inherits="WMS6.Web.Configuration.DistributionRangeList" %>

<%@ PreviousPageType VirtualPath="~/Configuration/DistributionRangeQuery.aspx" %>
<%@ Register Src="../UserControls/Pager.ascx" TagName="Pager" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>DistributionRangeList</title>
    <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />

    <script src="../Js/jquery.js" type="text/javascript"></script>

    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script>

    <script src="../Js/util.js" id="js" type="text/javascript"></script>

    <script src="../Js/InitPage.js" type="text/javascript"></script>

    <script src="../Js/checkbox.js" type="text/javascript"></script>

    <base target="_self" />

    <script type="text/javascript">
        //初始化页面
        window.onload = function(){            
            var action = document.getElementById("hdnActionID").value;
            if(action != null && action != "")
            {
                var array = action.split(',');
                initQueryPage(array[0],array[1]);
            }
            else
            {
                initListPage();
            }
        }   
        function returnSearch()
        {
            var from = document.getElementById("hdnFrom").value;
            if(from != "")
            {
                window.location.href = "DistributionRangeQuery.aspx";
            }
            else
            {
                window.history.go(-1);
            }
        }
                  function showAction()
		{	
			var pos = getElementPos("btnAction");	
			document.getElementById("actionDiv").style.top = pos.y+17;
			document.getElementById("actionDiv").style.left = pos.x;  			
			document.getElementById("hiddenFlag").value = '1';
		}
		 function hiddenDiv()
		{
			var flag = document.getElementById("hiddenFlag").value
			if(flag == "1")
			{
				document.getElementById("actionDiv").style.display = "block";
				document.getElementById("hiddenFlag").value = '0';
			}
			else 
			{
				document.getElementById("actionDiv").style.display = "none";
			}
		}
		
		//隐藏 DIV
        function ImporDataDivClose()
        {
           window.location.href = "../Configuration/DistributionRangeList.aspx";
        }
    </script>

</head>
<body>
    <form id="F2572" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div id="div_List_top">
            <table>
                <tr>
                    <td valign="bottom">
                        <asp:Label ID="lblDistributionRangeList" runat="server" CssClass="label_header" Text="配送区域列表"></asp:Label>
                    </td>
                    <td>
                        <asp:Button ID="btnEdit" runat="server" CssClass="button" Enabled="False" Text="<%$ Resources:ButtonResource,btnEdit %>"
                            OnClick="btnEdit_Click" />
                    </td>
                    <td>
                        <input id="btnAction" type="button" value="<%$Resources:ButtonResource,btnAction%>"
                            class="button" runat="server" onclick="showAction();" />
                    </td>
                </tr>
            </table>
        </div>
        <div class="blank8">
        </div>
        <asp:UpdatePanel ID="up1" runat="server">
            <ContentTemplate>
                <div id="div_List">
                    <div id="div_List_msg">
                        <asp:Label ID="lblMsg" runat="server" CssClass="label_message"></asp:Label>
                    </div>
                    <asp:GridView ID="gvDistributionRange" runat="server" AutoGenerateColumns="False"
                        AllowSorting="True" OnRowDataBound="gvDistributionRange_RowDataBound" OnSorting="gvDistributionRange_Sorting"
                        OnInit="gvDistributionRange_Init" CssClass="gridview" DataKeyNames="ROWID" PageSize="20"
                        Width="1000px" meta:resourcekey="gvDistributionRange">
                        <FooterStyle CssClass="GridViewFooterStyle" />
                        <RowStyle CssClass="GridViewRowStyle" />
                        <HeaderStyle CssClass="GridViewHeaderStyle" />
                        <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                        <Columns>
                            <asp:BoundField HeaderText="序号" FooterText="序号" meta:resourcekey="BoundField">
                                <ItemStyle CssClass="GridViewRowWidth_40" />
                            </asp:BoundField>
                            <asp:TemplateField meta:resourcekey="TemplateFieldResource1">
                                <HeaderTemplate>
                                    <img src="../Images/gvSettingpic.gif" id="img01" class="gvSettingImg" onclick="gvUserSetting('2562','gvPort');"
                                        onmouseover="showGVUserSettingAlt(this);" alt="customize list" />
                                    <asp:CheckBox ID="CheckBox1" runat="server" onclick="selectAll(this,'gvPort');" meta:resourcekey="CheckBox1" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="chbSelect" runat="server" meta:resourcekey="chbSelect" />
                                </ItemTemplate>
                                <FooterTemplate>
                                    <asp:CheckBox ID="CheckBox2" runat="server" onclick="selectAll(this,'gvPort');" meta:resourcekey="CheckBox2" />
                                </FooterTemplate>
                                <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_50" />
                                <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_50" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="省份" FooterText="省份" SortExpression="PROVINCE" meta:resourcekey="PROVINCE">
                                <ItemTemplate>
                                    <asp:HyperLink ID="HyperLink1" runat="server" Text='<%# Eval("PROVINCE") %>' NavigateUrl='<%# FormatUrl("~/Configuration/DistributionRange.aspx?from=list&ID={0}",Eval("ROWID").ToString()) %>'
                                        Target="_self" CssClass="hyperlink"></asp:HyperLink>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="CITY" HeaderText="城市" FooterText="城市" SortExpression="CITY">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            <asp:BoundField DataField="COUNTIES" HeaderText="区县" FooterText="区县" SortExpression="COUNTIES">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            <asp:BoundField DataField="CARRIER_ID" HeaderText="承运商" FooterText="承运商" SortExpression="CARRIER_ID">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            <asp:TemplateField FooterText="首重重量" HeaderText="首重重量" SortExpression="INITIAL_WEIGHT">
                                <ItemTemplate>
                                    <asp:Label ID="lblINITIAL_WEIGHT" runat="server" Text='<%# GetPreferenceDigit(Eval("INITIAL_WEIGHT").ToString()) %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:TemplateField>
                            <asp:TemplateField FooterText="首重价格" HeaderText="首重价格" SortExpression="INITIAL_WEIGHT_PRICE">
                                <ItemTemplate>
                                    <asp:Label ID="lblINITIAL_WEIGHT_PRICE" runat="server" Text='<%# GetPreferenceDigit(Eval("INITIAL_WEIGHT_PRICE").ToString()) %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:TemplateField>
                            <asp:TemplateField FooterText="续重重量" HeaderText="续重重量" SortExpression="CONTINUOUS_WEIGHT">
                                <ItemTemplate>
                                    <asp:Label ID="lblCONTINUOUS_WEIGHT" runat="server" Text='<%# GetPreferenceDigit(Eval("CONTINUOUS_WEIGHT").ToString()) %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:TemplateField>
                            <asp:TemplateField FooterText="续重价格" HeaderText="续重价格" SortExpression="CONTINUOUS_WEIGHT_PRICE">
                                <ItemTemplate>
                                    <asp:Label ID="lblCONTINUOUS_WEIGHT_PRICE" runat="server" Text='<%# GetPreferenceDigit(Eval("CONTINUOUS_WEIGHT_PRICE").ToString()) %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </div>
                <div id="div_pager">
                    <uc1:Pager ID="PagerFooter" runat="server" OnFirst="btnFirst_Click" OnPrevious="btnPrevious_Click"
                        OnNext="btnNext_Click" OnLast="btnLast_Click" OnGoTo="GoTo_Click" />
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
        <div id="div_List_bottom">
            <table>
                <tr>
                    <td>
                    </td>
                    <td>
                        <asp:Button ID="btnReSearch" runat="server" Text="<%$Resources:ButtonResource,btnReSearch%>"
                            CssClass="button" OnClientClick="javascript:returnSearch();return false;" />
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <div id="actionDiv" style="background-color: #FFFFFF; position: absolute; display: none;
        border: none 0 black">
        <table width="105" border="0" cellspacing="0" cellpadding="0" id="divcontent_menu">
            <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                <td class="line" id="tdlnkbtnImportData" runat="server" visible="false">
                    <asp:LinkButton ID="lnkbtnImportData" runat="server" Text="数据导入" OnClientClick="ImporDataAuthentication('DistributionRange','','');return false"
                        meta:resourcekey="lnkbtnImportData"></asp:LinkButton>
                </td>
            </tr>
        </table>
    </div>
    <input type="hidden" id="hdnFrom" runat="server" />
    <input type="hidden" id="hdnActionID" runat="server" />
    <input type="hidden" id="hiddenFlag" runat="server" />
    </form>
</body>
</html>

<script language="javascript" type="text/javascript" event="onclick" for="document">
		<!--
			hiddenDiv();
		//-->
</script>

